﻿<UserControl  x:Class="MemoBoss.ScoreboardScreen"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:local="clr-namespace:MemoBoss"
     xmlns:system="clr-namespace:System;assembly=mscorlib"
    mc:Ignorable="d"
    d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignWidth="480" d:DesignHeight="800">
    <UserControl.Resources>
        <local:AppSettings x:Key="appSettings"></local:AppSettings>
        <Storyboard x:Name="Hide">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="500"/>
            </DoubleAnimationUsingKeyFrames>
            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>-->
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="LayoutRoot">
                <DiscreteObjectKeyFrame KeyTime="0" >
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="Show"  Completed="Show_Completed">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="500"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/>
            </DoubleAnimationUsingKeyFrames>-->
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="LayoutRoot">
                <DiscreteObjectKeyFrame KeyTime="0" >
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>

        <local:ColorConverter x:Key="colorConverter"></local:ColorConverter>
        <local:VisibilityConverter x:Key="visibilityConverter"></local:VisibilityConverter>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Loaded="LayoutRoot_Loaded" RenderTransformOrigin="0.5,0.5">
        <Grid.RenderTransform>
            <TranslateTransform/>
        </Grid.RenderTransform>

        <Grid x:Name="ContentPanel"  Margin="12,0,12,0" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <Grid x:Name="btnBack" Margin="10,10,0,10" Grid.Column="0" VerticalAlignment="Top"  Tap="btnBack_Tap">
                <Image   Stretch="None" Source="/Icons/appbar.back.rest.png"  HorizontalAlignment="Left" />
                <Image   Stretch="None" Source="/Icons/appbar.basecircle.rest.png"  HorizontalAlignment="Left" />
            </Grid>
            <!--ContentPanel - place additional content here-->
            <Grid  Grid.Column="1" Margin="0,0,12,0">
               
                <!--<TextBlock x:Name="Version" Text="Scoreboard"  Style="{StaticResource PhoneTextTitle2Style}" VerticalAlignment="Center" />-->
                <!--<ScrollViewer     ScrollViewer.VerticalScrollBarVisibility="Hidden" Grid.Row="1" Margin="0,0,0,10">-->
                <controls:Pivot x:Name="pvtScoreboards" Title="Scoreboards" FontSize="40">
                    <!--Pivot item one-->
                    <controls:PivotItem x:Name="easyPivot">
                        <controls:PivotItem.Header>
                            <Grid Margin="0,20,0,0">
                                <TextBlock Name="Easy" FontSize="30" Text="Easy" />
                            </Grid>
                        </controls:PivotItem.Header>
                        <!--Double line list with text wrapping-->
                        <local:Scoreboard Margin="0,0,0,20"></local:Scoreboard>
                    </controls:PivotItem>

                    <controls:PivotItem x:Name="mediumPivot">
                        <controls:PivotItem.Header>
                            <Grid Margin="0,20,0,0">
                                <TextBlock Name="Medium" FontSize="30" Text="Medium" />
                            </Grid>
                        </controls:PivotItem.Header>
                        <!--Triple line list no text wrapping-->
                        <local:Scoreboard Margin="0,0,0,20"></local:Scoreboard>
                    </controls:PivotItem>
                    <controls:PivotItem x:Name="hardPivot">
                        <controls:PivotItem.Header>
                            <Grid Margin="0,20,0,0">
                                <TextBlock Name="Hard" FontSize="30" Text="Hard" />
                            </Grid>
                        </controls:PivotItem.Header>
                        <!--Triple line list no text wrapping-->
                        <local:Scoreboard Margin="0,0,0,20"></local:Scoreboard>
                    </controls:PivotItem>
                    <controls:PivotItem x:Name="memoBossPivot">
                        <controls:PivotItem.Header>
                            <Grid Margin="0,20,0,0">
                                <TextBlock Name="MemoBoss" FontSize="30" Text="Memo Boss" />
                            </Grid>
                        </controls:PivotItem.Header>
                        <!--Triple line list no text wrapping-->
                        <local:Scoreboard Margin="0,0,0,20"></local:Scoreboard>
                    </controls:PivotItem>
                </controls:Pivot>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
